using System;

namespace Mitosoft.Definitions.Logging
{
    /// <summary>
    /// Handles a log entry request.
    /// </summary>
    /// <param name="source">Represents the source requesting the log entry.</param>
    /// <param name="comment">Comment which also should be logged.</param>
    /// <param name="ex">Possible exception which also should be logged.</param>
    public delegate void LogEntryReceiver(string source, string comment, Exception ex);

    public interface ILogable
    {
        /// <summary>
        /// Occurs when a log entry is requested and
        /// it is expected that it should be stored.
        /// </summary>
        event LogEntryReceiver LogEntryRequested;
    }
}
